package me.zhengjie.server.service;

import me.zhengjie.server.domain.ServerInfo;
import me.zhengjie.server.service.dto.ServerInfoDTO;
import me.zhengjie.server.service.dto.ServerInfoQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @author yhg
* @date 2019-11-25
*/
public interface ServerInfoService {

    /**
    * 查询数据分页
    * @param criteria 条件参数
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(ServerInfoQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<ServerInfoDTO>
    */
    List<ServerInfoDTO> queryAll(ServerInfoQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return ServerInfoDTO
     */
    ServerInfoDTO findById(Long id);

    ServerInfoDTO create(ServerInfo resources);

    void update(ServerInfo resources);

    void delete(Long id);

    void download(List<ServerInfoDTO> all, HttpServletResponse response) throws IOException;
}